//
//  ZYSportMainViewController.m
//  LoveSport
//
//  Created by 王朝阳 on 2016/11/8.
//  Copyright © 2016年 wangzhaoyang. All rights reserved.
//

#import "ZYSportMainViewController.h"
#import "ZYSportTracking.h"
#import "ZYSportSportingViewController.h"

@interface ZYSportMainViewController ()

@end

@implementation ZYSportMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

/**
 开始运动的按钮

 @param sender 按钮
 */
- (IBAction)startSports:(UIButton *)sender {
    ZYSportType type = sender.tag;
    //实例化运动控制器
//    ZYSportSportingViewController *vc = [[ZYSportSportingViewController alloc] init];
    //实例化监控控制器
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"ZYSportSporting" bundle:nil];
    ZYSportSportingViewController *vc = sb.instantiateInitialViewController;
    vc.sportType = type;
    //展示运动控制器
    [self presentViewController:vc animated:YES completion:nil];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
